Due Jun 29, 2:59 AM EDT
To answer the following questions you have to analyse dataset flags.csv. You can either install Anaconda to your local computer, download file flags.csv from Course resources, put it into your Jupyter working folder (for example, using Jupyter upload feature) and analyse locally, or just use our Final Project Lab — everything is ready here.
First of all, you have to read dataset using pd.read_csv and save the resulting dataframe in some variable.
How many variables are in dataset?
What is the type of variable area?
What is the type of variable mainhue?
What is the type of variable religion?
How many levels present in variable mainhue?
What is the mode of variable mainhue?
Assume I choose random flag from the dataset (all flags can be chosen with equal probabilities). What is the probability that this flag's main hue is blue? Enter proper fraction (like 12/25).
I selected a flag randomly (all flags have equal probabilities). Consider two events: A: 'this flag has no circles' and B: 'this flag has no bars'. Find P(A∣B). Enter proper fraction (e.g. 12/13).
Hint: you can use pd.crosstab() to get a table of co-occurrences of variables circles and bars. Arguments of this function are two columns of your dataframe.
I selected a flag randomly (all flags have equal probabilities). Consider two random variables: X=number of bars on the flag and Y=number of crosses on the flag. Are they independent?
Find Pearson's correlation coefficient between area and population up to 2 decimal places after decimal point.